/*
 * Copyright 2009-2009 Tiago da Fonseca Frazao  All rights reserved.
 */

package mz.co.research.shared.model;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.MappedSuperclass;

/**
 * @author Tiago da Fonseca Frazao
 */
@MappedSuperclass
public abstract class UpdatableEntity extends CreatableEntity {

	@Column(name = "UPDATED_BY")
	private Long updatedBy;

	@Column(name = "UPDATE_DATE")
	private Date updateDate;

	/**
	 * @return the updatedBy
	 */

	public Long getUpdatedBy() {
		return updatedBy;
	}

	/**
	 * @param updatedBy
	 *            the updatedBy to set
	 */

	public void setUpdatedBy(Long updatedBy) {
		this.updatedBy = updatedBy;
	}

	/**
	 * @return the updateDate
	 */

	public Date getUpdateDate() {
		return updateDate;
	}

	/**
	 * @param updateDate
	 *            the updateDate to set
	 */

	public void setUpdateDate(Date updateDate) {
		this.updateDate = updateDate;
	}

	@Override
	public String toString() {
		StringBuilder buffer = new StringBuilder("\nCreatableEntity");

		buffer.append(super.toString());

		buffer.append("\nupdatedBy  :" + this.updatedBy);
		buffer.append("\nupdateDate :" + this.updateDate);

		return buffer.toString();
	}
}
